Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
duplitect
is a simple tool to detect duplicate versions of installed packages. JavaScript package managers such as NPM and Yarn habitually allow you to install multiple versions of (transient) dependencies. This works most of the time - for certain kinds of packages, it does not.
untool
happens to be among these packages that have to be installed exactly once inside any given project, which is why we built this module.
Using NPM:
npm install -S duplitect
Using Yarn:
yarn add duplitect
Usually, you will want to use duplitect
as a CLI tool. Since most typical Node.js projects contain a significant number of (unproblematic) duplicates, you will probably want to limit duplitect
's output by passing one or more patterns.
$ duplitect untool @untool*
Duplicate: untool
Duplicate: @untool/core
duplitect
supports the wildcard character *
as shown above. This allows you to match multiple, possibly scoped, packages at once.
getDuplicates(cwd, [pattern, pattern, ...])
You can also use duplitect
in your own tools - it only exposes a single function that mimics the CLI functionality. It returns a Promise
object that resolves to an array of strings identifying duplicate packages.
const getDuplicates = require('duplitect');
getDuplicates(process.cwd(), 'untool', '@untool*').then(duplicates => {
duplicates.forEach(duplicate => console.log(`Duplicate: duplicate`));
});
FAQs
Package Duplicate Detector
The npm package duplitect receives a total of 164 weekly downloads. As such, duplitect popularity was classified as not popular.
We found that duplitect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.